﻿<%@ Page Title="Installing ResourceBlender.NET" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Install.aspx.cs" Inherits="Install" %>

<asp:Content ID="contentHead" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="contentMain" ContentPlaceHolderID="cntMain" Runat="Server">
    <h1>Install ResourceBlender.NET</h1>
    <asp:Panel ID="pnlError" runat="server" CssClass="errorDiv">
        <h2>Warning</h2>
        <asp:Label ID="lblError" runat="server"></asp:Label>
    </asp:Panel>
    <div class="niceform">
        <asp:Wizard ID="wzdInstall" runat="server" ActiveStepIndex="0" 
            DisplaySideBar="False" FinishDestinationPageUrl="Default.aspx" 
            Width="100%" OnNextButtonClick="wzdInstall_NextButtonClick">
            <WizardSteps>
                <asp:WizardStep ID="stpDatabase" runat="server" Title="Configure Database" StepType="Start">
                    <h2>Configure Database</h2>
                    <div class="formrow block">
                        <asp:Label ID="lblDBMode" runat="server" AssociatedControlID="radDBMode" 
                            Text="Database Type"></asp:Label>
                        <br />
                        <asp:RadioButtonList ID="radDBMode" runat="server" CssClass="checks" 
                            OnSelectedIndexChanged="radDBMode_SelectedIndexChanged" AutoPostBack="True">
                        </asp:RadioButtonList>
                        <asp:RequiredFieldValidator ID="vldDBMode" runat="server" 
                            ControlToValidate="radDBMode" Display="Dynamic" 
                            ErrorMessage="Database type must be specified" 
                            CssClass="validationerror block"></asp:RequiredFieldValidator>
                    </div>
                    <div class="formrow block">
                        <asp:Label ID="lblDBHost" runat="server" AssociatedControlID="txtDBHost" 
                            Text="Host"></asp:Label>
                        <asp:TextBox ID="txtDBHost" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="vldDBHost" runat="server" 
                            ControlToValidate="txtDBHost" Display="Dynamic" 
                            ErrorMessage="You must enter the database hostname" 
                            CssClass="validationerror block"></asp:RequiredFieldValidator>
                    </div>
                    <div class="formrow block" title="Settings &raquo; ResourceBlender.NET">
                        <asp:Label ID="lblDBPort" runat="server" AssociatedControlID="txtDBPort" 
                            Text="Port"></asp:Label>
                        <asp:TextBox ID="txtDBPort" runat="server"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="vldDBPort" runat="server" 
                            ErrorMessage="You must enter the database port" ControlToValidate="txtDBPort"
                            CssClass="validationerror block" ValidationExpression="\d+" 
                            SetFocusOnError="True" Display="Dynamic"></asp:RegularExpressionValidator>
                        <asp:RequiredFieldValidator ID="vldPortEmpty" runat="server" 
                            ErrorMessage="You must enter the database port" ControlToValidate="txtDBPort"
                            CssClass="validationerror block"
                            SetFocusOnError="True" Display="Dynamic"></asp:RequiredFieldValidator>
                    </div>
                    <div class="formrow block">
                        <asp:Label ID="lblDBUser" runat="server" AssociatedControlID="txtDBUser" 
                            Text="Username"></asp:Label>
                        <asp:TextBox ID="txtDBUser" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="vldDBUser" runat="server" 
                            ControlToValidate="txtDBUser" Display="Dynamic" 
                            ErrorMessage="You must enter the database username" 
                            CssClass="validationerror block"></asp:RequiredFieldValidator>
                    </div>
                    <div class="formrow block">
                        <asp:Label ID="lblDBPassword" runat="server" AssociatedControlID="txtDBPassword" 
                            Text="Password"></asp:Label>
                        <asp:TextBox ID="txtDBPassword" runat="server" TextMode="Password"></asp:TextBox>
                    </div>
                    <div class="formrow block">
                        <asp:Label ID="lblDBDatabase" runat="server" AssociatedControlID="txtDBDatabase" 
                            Text="Database Name"></asp:Label>
                        <asp:TextBox ID="txtDBDatabase" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="vldDBDatabase" runat="server" 
                            ControlToValidate="txtDBDatabase" Display="Dynamic" 
                            ErrorMessage="You must enter the database name" 
                            CssClass="validationerror block"></asp:RequiredFieldValidator>
                    </div>
                    <div class="formrow block">
                        <asp:Label ID="lblTablePrefix" runat="server" AssociatedControlID="txtTablePrefix" 
                            Text="Table Prefix"></asp:Label>
                        <asp:TextBox ID="txtTablePrefix" runat="server"></asp:TextBox>
                    </div>
                </asp:WizardStep>
                <asp:WizardStep ID="stpUsers" runat="server" Title="Configure Users">
                    <h2>Configure Users</h2>
                    <div class="formrow block">
                        <asp:Label ID="lblAdminUsername" runat="server" AssociatedControlID="txtAdminUsername" 
                            Text="User Name"></asp:Label>
                        <asp:TextBox ID="txtAdminUsername" runat="server"></asp:TextBox>
                        <br />
                        <asp:RequiredFieldValidator ID="vldUsername" runat="server" 
                            ControlToValidate="txtAdminUsername" Display="Dynamic" 
                            ErrorMessage="You must enter a user name" 
                            CssClass="validationerror block"></asp:RequiredFieldValidator>
                    </div>
                    <div class="formrow block">
                        <asp:Label ID="lblAdminPassword" runat="server" AssociatedControlID="txtAdminPassword"
                            Text="Password"></asp:Label>
                        <asp:TextBox ID="txtAdminPassword" runat="server" TextMode="Password"></asp:TextBox>
                    </div>
                </asp:WizardStep>
                <asp:WizardStep ID="stpFinished" runat="server" Title="Finished" StepType="Finish">
                    <h2>Success</h2>
                    <p>ResourceBlender.NET has been installed, you can now <asp:HyperLink ID="lnkDashboard" runat="server" NavigateUrl="Default.aspx">proceed to the dashboard</asp:HyperLink>.</p>
                    <p>Please take a few minutes to read through the quick start guide at <a href="http://wiki.lime49.com/index.php?title=Quickstart_(ResourceBlender.NET)">the Lime49 Wiki</a>.</p>
                </asp:WizardStep>
            </WizardSteps>
        </asp:Wizard>
    </div>
</asp:Content>

